\(\int \frac {\sqrt {a^2+2 a b x+b^2 x^2}}{x^3} \, dx\) [144]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [C] (warning: unable to verify)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [B] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 24, antiderivative size = 35 \[ \int \frac {\sqrt {a^2+2 a b x+b^2 x^2}}{x^3} \, dx=-\frac {(a+b x) \sqrt {a^2+2 a b x+b^2 x^2}}{2 a x^2} \]

[Out]

-1/2*(b*x+a)*((b*x+a)^2)^(1/2)/a/x^2

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {660, 37} \[ \int \frac {\sqrt {a^2+2 a b x+b^2 x^2}}{x^3} \, dx=-\frac {(a+b x) \sqrt {a^2+2 a b x+b^2 x^2}}{2 a x^2} \]

[In]

Int[Sqrt[a^2 + 2*a*b*x + b^2*x^2]/x^3,x]

[Out]

-1/2*((a + b*x)*Sqrt[a^2 + 2*a*b*x + b^2*x^2])/(a*x^2)

Rule 37

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(a + b*x)^(m + 1)*((c + d*x)^(n +
1)/((b*c - a*d)*(m + 1))), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[m + n + 2, 0] && NeQ
[m, -1]

Rule 660

Int[((d_.) + (e_.)*(x_))^(m_)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Dist[(a + b*x + c*x^2)^Fra
cPart[p]/(c^IntPart[p]*(b/2 + c*x)^(2*FracPart[p])), Int[(d + e*x)^m*(b/2 + c*x)^(2*p), x], x] /; FreeQ[{a, b,
 c, d, e, m, p}, x] && EqQ[b^2 - 4*a*c, 0] &&  !IntegerQ[p] && NeQ[2*c*d - b*e, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {\sqrt {a^2+2 a b x+b^2 x^2} \int \frac {a b+b^2 x}{x^3} \, dx}{a b+b^2 x} \\ & = -\frac {(a+b x) \sqrt {a^2+2 a b x+b^2 x^2}}{2 a x^2} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.16 (sec) , antiderivative size = 31, normalized size of antiderivative = 0.89 \[ \int \frac {\sqrt {a^2+2 a b x+b^2 x^2}}{x^3} \, dx=-\frac {\sqrt {(a+b x)^2} (a+2 b x)}{2 x^2 (a+b x)} \]

[In]

Integrate[Sqrt[a^2 + 2*a*b*x + b^2*x^2]/x^3,x]

[Out]

-1/2*(Sqrt[(a + b*x)^2]*(a + 2*b*x))/(x^2*(a + b*x))

Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 2.

Time = 0.26 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.51

method result size
default \(-\frac {\operatorname {csgn}\left (b x +a \right ) \left (2 b x +a \right )}{2 x^{2}}\) \(18\)
gosper \(-\frac {\left (2 b x +a \right ) \sqrt {\left (b x +a \right )^{2}}}{2 x^{2} \left (b x +a \right )}\) \(28\)
risch \(\frac {\left (-b x -\frac {a}{2}\right ) \sqrt {\left (b x +a \right )^{2}}}{x^{2} \left (b x +a \right )}\) \(29\)

[In]

int(((b*x+a)^2)^(1/2)/x^3,x,method=_RETURNVERBOSE)

[Out]

-1/2*csgn(b*x+a)*(2*b*x+a)/x^2

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 11, normalized size of antiderivative = 0.31 \[ \int \frac {\sqrt {a^2+2 a b x+b^2 x^2}}{x^3} \, dx=-\frac {2 \, b x + a}{2 \, x^{2}} \]

[In]

integrate(((b*x+a)^2)^(1/2)/x^3,x, algorithm="fricas")

[Out]

-1/2*(2*b*x + a)/x^2

Sympy [F]

\[ \int \frac {\sqrt {a^2+2 a b x+b^2 x^2}}{x^3} \, dx=\int \frac {\sqrt {\left (a + b x\right )^{2}}}{x^{3}}\, dx \]

[In]

integrate(((b*x+a)**2)**(1/2)/x**3,x)

[Out]

Integral(sqrt((a + b*x)**2)/x**3, x)

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 80 vs. \(2 (22) = 44\).

Time = 0.19 (sec) , antiderivative size = 80, normalized size of antiderivative = 2.29 \[ \int \frac {\sqrt {a^2+2 a b x+b^2 x^2}}{x^3} \, dx=\frac {\sqrt {b^{2} x^{2} + 2 \, a b x + a^{2}} b^{2}}{2 \, a^{2}} + \frac {\sqrt {b^{2} x^{2} + 2 \, a b x + a^{2}} b}{2 \, a x} - \frac {{\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}^{\frac {3}{2}}}{2 \, a^{2} x^{2}} \]

[In]

integrate(((b*x+a)^2)^(1/2)/x^3,x, algorithm="maxima")

[Out]

1/2*sqrt(b^2*x^2 + 2*a*b*x + a^2)*b^2/a^2 + 1/2*sqrt(b^2*x^2 + 2*a*b*x + a^2)*b/(a*x) - 1/2*(b^2*x^2 + 2*a*b*x
 + a^2)^(3/2)/(a^2*x^2)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.11 \[ \int \frac {\sqrt {a^2+2 a b x+b^2 x^2}}{x^3} \, dx=-\frac {b^{2} \mathrm {sgn}\left (b x + a\right )}{2 \, a} - \frac {2 \, b x \mathrm {sgn}\left (b x + a\right ) + a \mathrm {sgn}\left (b x + a\right )}{2 \, x^{2}} \]

[In]

integrate(((b*x+a)^2)^(1/2)/x^3,x, algorithm="giac")

[Out]

-1/2*b^2*sgn(b*x + a)/a - 1/2*(2*b*x*sgn(b*x + a) + a*sgn(b*x + a))/x^2

Mupad [B] (verification not implemented)

Time = 9.18 (sec) , antiderivative size = 27, normalized size of antiderivative = 0.77 \[ \int \frac {\sqrt {a^2+2 a b x+b^2 x^2}}{x^3} \, dx=-\frac {\sqrt {{\left (a+b\,x\right )}^2}\,\left (a+2\,b\,x\right )}{2\,x^2\,\left (a+b\,x\right )} \]

[In]

int(((a + b*x)^2)^(1/2)/x^3,x)

[Out]

-(((a + b*x)^2)^(1/2)*(a + 2*b*x))/(2*x^2*(a + b*x))